package com.gjr.eduservice.client;

import com.gjr.commonutils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author 呙境仁
 * @create 2022-11-28 20:04
 */

@FeignClient(name = "service-vod", fallback = VodFileDegradeFeginClient.class)
@Component
public interface VodClient {

    /**
     * 根据视频id删除阿里云视频
     *
     * @param id 视频id
     * @return 返回值
     */
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    Result<?> removeAlyVideo(@PathVariable(value = "id") String id);

    /**
     * 删除多个阿里云视频的方法
     *
     * @param videoIdList 视频id集合
     * @return 返回值
     */
    @DeleteMapping("/eduvod/video/delete-batch")
    Result<?> deleteBatch(@RequestBody List<String> videoIdList);
}
